<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('关联题库')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-course_id" min="0" data-source="course/index" class="form-control selectpage" placeholder="请选择关联题库" name="row[course_id]" type="text" value="{$course_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" placeholder="请输入资料名称" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('资料类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[version]', ['1'=>__('在线资料'), '2'=>__('网盘资料')],1)}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('资料介绍')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-desc" data-rule="required" data-height="30" data-min-height="30"  class="form-control editor" name="row[desc]" rows="3" placeholder="资料介绍" ></textarea>
        </div>
    </div>

    <!-- 上传文件 -->
    <div class="form-group m_type_1">
        <label for="c-remote_url" class="control-label col-xs-12 col-sm-2">上传资料:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-remote_url" data-rule="" class="form-control" size="50" name="row[remote_url]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-remote_url" class="btn btn-danger faupload" data-input-id="c-remote_url" data-mimetype="doc,xls,ppt,pdf,docx,xlsx,pptx" data-multiple="false" data-preview-id="p-remote_url"><i class="fa fa-upload"></i> 上传</button></span>
                    <span><button type="button" id="fachoose-remote_url" class="btn btn-primary fachoose" data-input-id="c-remote_url" data-mimetype="doc,xls,ppt,pdf,docx,xlsx,pptx" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="c-remote_url"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-remote_url"></ul>
        </div>
    </div>

    <div class="form-group m_type_2" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('网盘链接')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea name="row[content]"  class="form-control" rows="3" id="c-content" placeholder="请输入网盘分享链接地址"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('积分价格')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" min="0" class="form-control" name="row[price]" type="number" placeholder="请输入积分兑换价格" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('购买价格')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-real_price" data-rule="required" min="0" class="form-control" name="row[real_price]" placeholder="请输入直接购买价格" type="number" value="">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Expire')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-expire" data-rule="required" min="0" class="form-control" name="row[expire]"  type="number"  value="30">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hot')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hot" data-rule="required" min="0" class="form-control" name="row[hot]" type="number" value="0">
        </div>
    </div>



    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
